﻿/*
	The custom cursor class will allow you
	to place custom cursors for dragging etc.
	
*/

package com.sense.canvas {
	
	import flash.display.*
	import flash.events.*
	import com.sense.canvas.*
	
	public class CustomCursor extends MovieClip {
	
		private var canvas
				// custom cursors need to move to a different class
		// public var border_cursor:MovieClip
		public var move_cursor:MovieClip
	
		public function CustomCursor(canvas:Canvas) {
		}
		
		
			// event listeners go on this class
			//addEventListener(MouseEvent.MOUSE_OVER, doMouseOver)
			//addEventListener(MouseEvent.MOUSE_OUT, doMouseOut)

			
		// cursors should go to another class
		private function doMouse(e:Event) {
			/*
			move_cursor.x = stage.mouseX
			move_cursor.y = stage.mouseY
			border_cursor.x = stage.mouseX
			border_cursor.y = stage.mouseY
			*/
		}
		
		//on doremovefromstage
		// custom cursors go to a seperate class
		//stage.removeChild(move_cursor)
		//stage.removeChild(border_cursor)
		//Mouse.show()
		

			//stage.addEventListener(Event.ENTER_FRAME, doMouse) --> goes with custom curser

			// removeEventListener(MouseEvent.MOUSE_OVER, doMouseOver)
			// removeEventListener(MouseEvent.MOUSE_OUT, doMouseOut)
//stage.removeEventListener(Event.ENTER_FRAME, doMouse) --> goes with custom cursor
		
		// dragging cursor
		private function doMouseOver(evtObj:Event) {		
			// curser stuff goes in another class
			if (evtObj.target.name == "background") {
				//Mouse.hide()
				//move_cursor.visible = true
				//move_cursor.gotoAndStop(1)
			
			}else{
				//Mouse.show()
				//move_cursor.visible = false
			}
		}
		
		private function canvasMouseDown(e:Event) {
							//Mouse.hide()
				//move_cursor.visible = true
				//move_cursor.gotoAndStop(2)
		}
		
		private function canvasMouseUp(e:Event) {
							//Mouse.show()
				//move_cursor.visible = false
		}
		
		// remove dragging cursor
		private function doMouseOut(evtObj:Event) {
			// curser stuff goes in another class
			//Mouse.show()
			//move_cursor.visible = false
		}

		
		// custom cursors go in seperate class
			/*
			border_cursor = new move_arrow()
			border_cursor.name = "border_cursor"
			border_cursor.visible = false
			border_cursor.mouseEnabled = false
			stage.addChild(border_cursor)

			move_cursor = new move_cirkle()
			move_cursor.name = "move_cursor"
			stage.addChild(move_cursor)
			move_cursor.visible = false
			move_cursor.mouseEnabled = false
			*/
			
	
	}
}